﻿Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox6.Text = ""

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TextBox6.Text = ""

        Dim pp As New Examples.System.Net.NetworkInformation.PingTest.PingExamplex

        Dim url As String = r1.Text.ToString & "." & r2.Text.ToString & "." & r3.Text.ToString & "."
        Dim partida As Integer = Val(r4.Text)
        Dim fin As Integer = Val(r5.Text)

        For g As Integer = partida To fin
            'TextBox6.Text = TextBox6.Text & "-------------------" & vbCrLf
            Application.DoEvents()
            TextBox6.Text = TextBox6.Text & " IP: " & g & vbCrLf
            TextBox6.Text = TextBox6.Text & pp.hacerping(Trim(url) & Trim(Str(g)))

            TextBox6.SelectionStart = TextBox6.Text.Length
            TextBox6.ScrollToCaret()

        Next



    End Sub
End Class
